因为系统异常退出, 导致容器不能启动, 提示下面错误:

  1. root@host:~# docker start gogs
  2. Error response from daemon: OCI runtime create failed: container with id exists: 1d8cac1e6ed19db70171786f102f66194d0b2fc5c9f8e6b58da73ae21b319dc8: unknown
  3. Error: failed to start containers: gogs

解决方法和步骤:

  1. 进入系统目录 cd /var/run/docker/runtime-runc/moby/
  2. 删除对应的id目录, 比如这里是 rm -rf 1d8cac1e6ed19db70171786f102f66194d0b2fc5c9f8e6b58da73ae21b319dc8

之后就可以成功 docker start gogs 了.